//
//  MyPaidCtrl.m
//  spotrs
//
//  Created by sky on 16/5/18.
//  Copyright © 2016年 TZ. All rights reserved.
//

#import "MyPaidCtrl.h"
#import "MyobligationCell.h"
#import "MyobligationInformationCtrl.h"
@interface MyPaidCtrl ()<UITableViewDelegate,UITableViewDataSource>
{
    UITableView *_table;
}
@end

@implementation MyPaidCtrl

- (void)viewDidLoad {
    [super viewDidLoad];
    [self buildLayout];
    // Do any additional setup after loading the view.
}

-(void)buildLayout{
    self.view.backgroundColor = [LCCommon getColor:@"f6f7f8"];
    self.titleText = @"已付款";
    [self creatTopNavagaiong];
    [self liftGoBackImage];
    
    _table = [[UITableView alloc]initWithFrame:CGRectMake(0, 64, SCREEN_WIDTH, SCREEN_HEIGHT - 64)];
    INIT_TABLE(_table);
    [self.view addSubview:_table];
}


- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}



#pragma -mark tableViewDelegate

- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section
{
    return 10;
}


- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath*)indexPath
{
    return 525/3;
}

-(UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
{
    static NSString *SimpleTableIdentifier = @"SimpleTableIdentifier";
    MyobligationCell *cell = [tableView dequeueReusableCellWithIdentifier:SimpleTableIdentifier];
    if (!cell) {
        cell = [[MyobligationCell alloc]initWithStyle:UITableViewCellStyleDefault reuseIdentifier:@"SimpleTableIdentifier"];
    }
    //赋值
    //cell.textLabel.text = [_arr objectAtIndex:indexPath.row];
    cell.source = @"0";
    cell.textStr = @"1";
    cell.ActionPreviewPressToSelelct = ^(){
        UIAlertView *alter = [[UIAlertView alloc]initWithTitle:nil message:@"取消后将无法恢复,确定取消此订单吗?" delegate:self cancelButtonTitle:@"确定" otherButtonTitles:@"取消", nil];
        [alter show];
    };
    cell.backgroundColor = [UIColor clearColor];
    cell.selectionStyle = UITableViewCellSelectionStyleNone;
    return cell;
}

-(void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath{
    MyobligationInformationCtrl *myobinfo = [[MyobligationInformationCtrl alloc]init];
    [self.navigationController pushViewController:myobinfo animated:YES];
}



@end
